home *** CD-ROM | disk | FTP | other *** search
- on @ whichSprite
- if the type of sprite whichSprite = 0 then
- put "There is no sprite in channel " & whichSprite & "."
- else
- set item1 to "Sprite loc: " & point(the locH of sprite whichSprite, the locV of sprite whichSprite)
- set centerH to ((the right of sprite whichSprite - the left of sprite whichSprite) / 2) + the left of sprite whichSprite
- set centerV to ((the bottom of sprite whichSprite - the top of sprite whichSprite) / 2) + the top of sprite whichSprite
- set item2 to " Sprite center: " & point(centerH, centerV)
- put item1 & item2
- end if
- end
-
- on ? whichSprite
- if the type of sprite whichSprite = 0 then
- put "There is no sprite in channel " & whichSprite & "."
- else
- set whichMember to the memberNum of sprite whichSprite
- set whichMemberName to whichMember
- if the name of member whichMember > 0 then
- set whichMemberName to QUOTE & the name of member whichMember & QUOTE
- end if
- set item1 to "Sprite: " & whichSprite & " member: " & whichMemberName & " Type: " & the type of sprite whichSprite
- set item1 to item1 & ", " & the type of member whichMember
- set item2 to " Ink: " & the ink of sprite whichSprite
- set item3 to " Sprite loc: " & point(the locH of sprite whichSprite, the locV of sprite whichSprite)
- set item4 to " Top left corner: " & point(the left of sprite whichSprite, the top of sprite whichSprite)
- set item5 to " Bottom right corner: " & point(the right of sprite whichSprite, the bottom of sprite whichSprite)
- set item6 to " Stretch: " & the stretch of sprite whichSprite & " Cursor: " & the cursor of sprite whichSprite
- set item7 to RETURN & RETURN & "To activate sprite [ whichSprite ] , copy this into your script: "
- set item8 to "activate [ whichSprite ] , " & whichMemberName & ", " & the type of sprite whichSprite & ", " & the ink of sprite whichSprite & ", "
- if the stretch of sprite whichSprite = 0 then
- set item9 to the locH of sprite whichSprite & ", " & the locV of sprite whichSprite & ", "
- set item9 to item9 & QUOTE & QUOTE & ", " & QUOTE & QUOTE & ", " & QUOTE
- else
- set item9 to the left of sprite whichSprite & ", " & the top of sprite whichSprite & ", " & QUOTE & "stretch to:" & QUOTE & ", "
- set item9 to item9 & the right of sprite whichSprite & ", " & the bottom of sprite whichSprite & RETURN
- end if
- put item1 & item2 & item3 & item4 & item5 & item6 & item7 & item8 & item9
- end if
- end
-
- on ! whichSprite
- if value(whichSprite) > 0 then
- if the type of sprite whichSprite = 0 then
- put "Cursor location: " & point(the mouseH, the mouseV)
- put "There is no sprite in channel " & whichSprite & "."
- else
- put "Cursor location: " & point(the mouseH, the mouseV)
- set item1 to "Cursor location, relative to the top left corner of sprite " & whichSprite & ": "
- set item2 to point(the mouseH - the left of sprite whichSprite, the mouseV - the top of sprite whichSprite)
- put item1 & item2
- end if
- else
- put "Cursor location: " & point(the mouseH, the mouseV)
- end if
- end
-
- on activate whichSprite, targetMember, targetType, targetInk, targetH, targetV, stretchBool, targetH2, targetV2
- puppetSprite(whichSprite, 1)
- set the type of sprite whichSprite to targetType
- if stringp(targetMember) then
- set the castNum of sprite whichSprite to the number of member targetMember
- else
- set the castNum of sprite whichSprite to targetMember
- end if
- set the ink of sprite whichSprite to targetInk
- set the foreColor of sprite whichSprite to 255
- set the backColor of sprite whichSprite to 0
- set the locH of sprite whichSprite to targetH
- set the locV of sprite whichSprite to targetV
- if stretchBool = EMPTY then
- set the stretch of sprite whichSprite to 0
- else
- set the stretch of sprite whichSprite to 1
- if targetH2 <> EMPTY then
- spriteBox(whichSprite, targetH, targetV, targetH2, targetV2)
- end if
- end if
- set the immediate of sprite whichSprite to 1
- end
-
- on deactivate spriteList
- if listp(spriteList) then
- set repeatLimit to count(spriteList)
- repeat with theCount = 1 to repeatLimit
- set whichSprite to getAt(spriteList, 1)
- set the type of sprite whichSprite to 0
- puppetSprite(whichSprite, 0)
- deleteAt(spriteList, 1)
- end repeat
- end if
- end
-
- on store spriteList
- global gStoredSpriteInfo
- if listp(spriteList) then
- if not listp(gStoredSpriteInfo) then
- set gStoredSpriteInfo to []
- sort(gStoredSpriteInfo)
- end if
- set repeatLimit to count(spriteList)
- repeat with theCount = 1 to repeatLimit
- set x to getAt(spriteList, 1)
- set spriteXinfo to [the type of sprite x]
- if the type of sprite x > 0 then
- append(spriteXinfo, the visible of sprite x)
- append(spriteXinfo, the puppet of sprite x)
- append(spriteXinfo, the castNum of sprite x)
- append(spriteXinfo, the ink of sprite x)
- append(spriteXinfo, the foreColor of sprite x)
- append(spriteXinfo, the backColor of sprite x)
- append(spriteXinfo, the locH of sprite x)
- append(spriteXinfo, the locV of sprite x)
- if QT(x) then
- append(spriteXinfo, the movieTime of sprite x)
- append(spriteXinfo, the movieRate of sprite x)
- end if
- end if
- setAt(gStoredSpriteInfo, x, spriteXinfo)
- deleteAt(spriteList, 1)
- end repeat
- end if
- end
-
- on restore spriteList
- global gStoredSpriteInfo
- if listp(spriteList) then
- if not listp(gStoredSpriteInfo) then
- set gStoredSpriteInfo to []
- sort(gStoredSpriteInfo)
- end if
- set repeatLimit to count(spriteList)
- repeat with theCount = 1 to repeatLimit
- set x to getAt(spriteList, 1)
- if count(gStoredSpriteInfo) >= x then
- set spriteXinfo to getAt(gStoredSpriteInfo, x)
- if listp(spriteXinfo) then
- set the type of sprite x to getAt(spriteXinfo, 1)
- if getAt(spriteXinfo, 1) > 0 then
- set the visible of sprite x to getAt(spriteXinfo, 2)
- set the puppet of sprite x to getAt(spriteXinfo, 3)
- set the castNum of sprite x to getAt(spriteXinfo, 4)
- set the ink of sprite x to getAt(spriteXinfo, 5)
- set the foreColor of sprite x to getAt(spriteXinfo, 6)
- set the backColor of sprite x to getAt(spriteXinfo, 7)
- set the locH of sprite x to getAt(spriteXinfo, 8)
- set the locV of sprite x to getAt(spriteXinfo, 9)
- if count(spriteXinfo) >= 11 then
- set the movieTime of sprite x to getAt(spriteXinfo, 10)
- set the movieRate of sprite x to getAt(spriteXinfo, 11)
- end if
- end if
- end if
- end if
- deleteAt(spriteList, 1)
- end repeat
- end if
- end
-
- on checkRange originalNumber, minValue, maxValue
- case originalNumber < minValue of
- 1:
- set originalNumber to minValue
- otherwise:
- case originalNumber > maxValue of
- 1:
- set originalNumber to maxValue
- end case
- end case
- return originalNumber
- end
-
- on checkRangeWrap originalNumber, minValue, maxValue
- case originalNumber < minValue of
- 1:
- repeat while originalNumber < minValue
- set originalNumber to maxValue - (minValue - originalNumber) + 1
- end repeat
- otherwise:
- case originalNumber > maxValue of
- 1:
- repeat while originalNumber > maxValue
- set originalNumber to minValue + (originalNumber - maxValue) - 1
- end repeat
- end case
- end case
- return originalNumber
- end
-
- on checkScripts checkSpritesToo
- repeat with x = 1 to 1340
- go(x)
- set thisScriptMember to the frameScript
- if thisScriptMember > 0 then
- set thisScriptText to the scriptText of member thisScriptMember
- if not (thisScriptText contains "exitFrame") then
- put RETURN & "ΓÇóΓÇóΓÇó Frame " & x & ", Frame Script, member " & thisScriptMember & ":"
- put RETURN & thisScriptText & RETURN
- end if
- end if
- if checkSpritesToo then
- repeat with y = 1 to 48
- if the type of sprite y > 0 then
- set thisScriptMember to the scriptNum of sprite y
- if thisScriptMember > 0 then
- set thisScriptText to the scriptText of member thisScriptMember
- if not (thisScriptText contains "mouseDown") then
- put RETURN & "ΓÇóΓÇóΓÇó Frame " & x & ", Sprite " & y & ", Sprite Script, member " & thisScriptMember & ":"
- put RETURN & thisScriptText & RETURN
- end if
- end if
- end if
- end repeat
- end if
- if (x mod 50) = 0 then
- put x & " Frames complete."
- unloadMember()
- end if
- end repeat
- put "Done."
- beep(3)
- end
-
- on bp beeps, message
- if beeps < 1 then
- set beeps to 1
- end if
- if message < 1 then
- set message to "Beep!"
- end if
- put message
- set oldSoundEnabled to the soundEnabled
- set oldSoundLevel to the soundLevel
- set the soundEnabled to 1
- set the soundLevel to 7
- beep(beeps)
- set the soundEnabled to oldSoundEnabled
- set the soundLevel to oldSoundLevel
- end
-
- on moveQD whichSprite, borderWidth
- if borderWidth < 1 then
- set borderWidth to 0
- end if
- repeat with x = the frame to marker(1)
- beginRecording()
- go(x)
- set the rect of sprite (whichSprite + 1) to rect(0, 0, 640, the top of sprite whichSprite - borderWidth)
- set the rect of sprite (whichSprite + 2) to rect(0, 0, the left of sprite whichSprite - borderWidth, 480)
- set the rect of sprite (whichSprite + 3) to rect(0, the bottom of sprite whichSprite + borderWidth, 640, 480)
- set the rect of sprite (whichSprite + 4) to rect(the right of sprite whichSprite + borderWidth, 0, 640, 480)
- updateFrame()
- endRecording()
- end repeat
- put "Done."
- beep()
- end
-
- on eh
- global gWhichMovie, gWhichClip
- set whichClass to class()
- put RETURN & RETURN
- put "class (): " & whichClass
- put "gWhichMovie: " & gWhichMovie & ", getAt ( gWhichMovie, " & whichClass & " ): " & getAt(gWhichMovie, whichClass)
- put "gWhichClip: " & gWhichClip & ", getAt ( gWhichClip, " & whichClass & " ): " & getAt(gWhichClip, whichClass)
- put RETURN & RETURN
- end
-
- on eh2
- setQuinVarsFaster()
- put RETURN & "setQuinVarsFaster:" & RETURN
- eh2.1()
- setQuinVarsSlower()
- put RETURN & "setQuinVarsSlower:" & RETURN
- eh2.1()
- end
-
- on eh2.1
- eh2.2("gMissionaryToDoggy", count(gMissionaryToDoggy), count(getAt(gMissionaryToDoggyDef, 1)), count(getAt(gMissionaryToDoggyDef, 2)))
- eh2.2("gDoggyToMissionary", count(gDoggyToMissionary), count(getAt(gDoggyToMissionaryDef, 1)), count(getAt(gDoggyToMissionaryDef, 2)))
- eh2.2("gTopToReverseTop", count(gTopToReverseTop), count(getAt(gTopToReverseTopDef, 1)), count(getAt(gTopToReverseTopDef, 2)))
- eh2.2("gReverseTopToTop", count(gReverseTopToTop), count(getAt(gReverseTopToTopDef, 1)), count(getAt(gReverseTopToTopDef, 2)))
- eh2.2("gTopToReverseTop2", count(gTopToReverseTop2), count(getAt(gTopToReverseTop2Def, 1)), count(getAt(gTopToReverseTop2Def, 2)))
- eh2.2("gReverseTopToTop2", count(gReverseTopToTop2), count(getAt(gReverseTopToTop2Def, 1)), count(getAt(gReverseTopToTop2Def, 2)))
- eh2.2("gMissionaryToTop", count(gMissionaryToTop), count(getAt(gMissionaryToTopDef, 1)), count(getAt(gMissionaryToTopDef, 2)))
- eh2.2("gDoggyToReverseTop", count(gDoggyToReverseTop), count(getAt(gDoggyToReverseTopDef, 1)), count(getAt(gDoggyToReverseTopDef, 2)))
- end
-
- on eh2.2 var0, var1, var2, var3
- if (var1 = var2) and (var1 = var3) then
- put var0 & " values are all set to " & var1 & "."
- else
- put var0 & " values are not identical: " & var1 & ", " & var2 & ", " & var3 & "."
- end if
- end
-
- on eh3
- set the scoreSelection to []
- set startFrame to label("open") + 1
- set stopFrame to label("open2") - 4
- beginRecording()
- repeat with x = startFrame to stopFrame
- put "Executing frame " & x - startFrame + 1 & " of " & stopFrame - startFrame + 1
- go(x)
- repeat with y = 1 to 11
- puppetSprite(y, 1)
- set the scoreColor of sprite y to 1
- set newLeft to 640 - (the left of sprite y - the locH of sprite y) - (11 - y)
- set newTop to 479 - (the top of sprite y - the locV of sprite y)
- set the loc of sprite y to point(newLeft, newTop)
- puppetSprite(y, 0)
- updateStage()
- end repeat
- updateFrame()
- end repeat
- endRecording()
- bp(1)
- put "Done."
- end
-
- on reverseList whichList
- set newList to []
- repeat with x = count(whichList) down to 1
- append(newList, getAt(whichList, x))
- end repeat
- return newList
- end
-